package com.ml.mall.service.company.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ml.mall.entity.company.SysCompanyReason;
import com.ml.mall.mapper.company.SysCompanyReasonMapper;
import com.ml.mall.service.company.SysCompanyReasonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class SysCompanyReasonServiceImpl extends ServiceImpl<SysCompanyReasonMapper, SysCompanyReason> implements SysCompanyReasonService{

    @Autowired
    private SysCompanyReasonMapper sysCompanyReasonMapper;

    @Override
    public void saveCompanyReason(String registrationReason, Long companyId) {
        if(null != registrationReason){
            SysCompanyReason sysCompanyReason = new SysCompanyReason();
            sysCompanyReason.setCompanyId(companyId);
            sysCompanyReason.setRegisterResion(registrationReason);
            sysCompanyReasonMapper.insert(sysCompanyReason);
        }
    }
}
